package com.nov.sourcecode.HashMap;

public class TestTry {

    public static void main(String[] args) {

        int x = inc();
        System.out.println(x);
    }
    public static int inc() {
        int x;
        try {
            x = 1;
            x = Integer.valueOf("A");
            return x;
        } catch (Exception e) {
            x = 2;
            System.out.println("Exception:"+x);
            return x;
        } finally {
            System.out.println("finally");
            x = 3;
            System.out.println("finally:"+x);
            return x;
        }
    }



    private static int getX() {
        int x;
        try {
            x = 1;
            System.out.println("1:"+x);
            x = Integer.valueOf("A");
            return x;
        } catch (Exception ex) {
            x = 2;
            System.out.println("Exception:" + ex.getMessage() + x);
            return x;
        } finally {
            x = 3;
            System.out.println("3:"+x);
            x = Integer.valueOf("B");
            return x;
        }
    }

}
